﻿<%@ Page Title="" Language="C#" MasterPageFile="../Shared/List.Master" Inherits="System.Web.Mvc.ViewPage<Longtop.Web.WebSite.Admin.Labels.ListModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <thead>
        <tr>
            <th>
                编号
            </th>
            <th>
                类名
            </th>
            <%--<th>
                父类名
            </th>--%>
            <th>
                排序
            </th>
            <th>
                操作
            </th>
        </tr>
    </thead>
    <tbody>
        <% foreach (var item in Model.PagedList) {
               var index = Model.PagedList.IndexOf(item);
        %>
        <tr>
            <td>
                <label>
                    <%=Html.CheckBoxFor(m=>m.PagedList[index].ShowBackend) %>
                    <%=Html.HiddenFor(m=>m.PagedList[index].LableId) %>
                    <%= Html.Encode(item.LableId) %></label>
            </td>
            <td>
                <%=item.Text %>
            </td>
            <%-- <td>
                <%=item.Text%>
            </td>--%>
            <td>
                <%= item.Sort %>
            </td>
            <td>
                <%= Html.ActionLink("编辑", "edit", new {  id=item.LableId}) %>
                |
                <%= Html.ActionLink("查看数据", "list", new {controller="cases", id=item.LableId}) %>
                <%if (item.AllowCreateChild) { %>
                |
                <%= Html.ActionLink("浏览 ["+item.Text+"] 的子类别", "list", new {controller="labels", id=item.LableId}) %>
                <%} %>
                |
                <%= Html.ActionLink("添加数据", "create", new {controller="cases", id=item.LableId}) %>
                <%--<%= Html.ActionLink("删除", "Delete", new {  id=item.LableId}) %>--%>
            </td>
        </tr>
        <% } %>
    </tbody>
</asp:Content>
<asp:Content ID="Pager" ContentPlaceHolderID="Pager" runat="server">
    <%=Html.Pager(Model) %>
</asp:Content>
